package com.crowntit.infrastructure.gateway;

import com.crowntit.infrastructure.gateway.dto.WeixinQrCodeRequestDTO;
import com.crowntit.infrastructure.gateway.dto.WeixinQrCodeResponseDTO;
import com.crowntit.infrastructure.gateway.dto.WeixinTokenResponseDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface IWeixinApiService {

    @GET("cgi-bin/token")
    Call<WeixinTokenResponseDTO> getToken(@Query("grant_type") String grantType,
                                          @Query("appid") String appId,
                                          @Query("secret") String appSecret);


    @POST("cgi-bin/qrcode/create")
    Call<WeixinQrCodeResponseDTO> createQrCode(@Query("access_token")String accessToken,
                                               @Body WeixinQrCodeRequestDTO weixinQrCodeReq);
}
